// FastString.h: interface for the FastString class.
//
//////////////////////////////////////////////////////////////////////

#ifndef __FASTSTRING_FASTSTRING__
#define __FASTSTRING_FASTSTRING__

#include "IFastString.h"
#include "IPersistentObject.h"
#include "DllExport.h"

class FastString : public IFastString,public IPersistentObject
{
public:
	FastString(const char * psz);
	virtual ~FastString();

	//IExtensibleObject
	virtual	void*	Dynamic_Cast(const char * pszType); 
	virtual void DuplicatePointer(void);
	virtual void DestoryPointer(void);

	//IFastString
	virtual	int		Length(void);
	virtual	int		Find(const char *psz)const;
	
	//IPersistentObject
	virtual int	Load(const char* pszFileName) ;
	virtual int	Save(const char* pszFileName) ;

private:
	const int m_iSize;
	char	*m_pData;
	
	// this is the object refer	ence number for resource management
	int		m_iPTRNumbers;
};

DLLEXPORTSYMBOL  IFastString * CreateFastString(const char* psz);

#endif //__FASTSTRING_FASTSTRING__
